CC=gcc

DEBUG=-g -ggdb3
OPTIM=-O0

INCLUDE_FLAGS= -I . \


# should use --gc-sections but the debugger does not seem to be able to cope with the option.
CFLAGS= $(DEBUG) $(OPTIM) -Wall 
LINKER_FLAGS= 
#-lwsock32 
#gprof: (both: linker and compiler)
#-pg 

OBJ_FILES=
MAIN_FILES= main.o 

all: main

main : $(OBJ_FILES) $(MAIN_FILES)
	$(CC) -o main main.o $(OBJ_FILES) $(LINKER_FLAGS)	

%.o : %.c Makefile
	$(CC) -c $(CFLAGS) $(INCLUDE_FLAGS) $< -o $@

clean :
	rm $(OBJ_FILES) $(MAIN_FILES) main
